package com.liqi.monitor.domain.dto;

import com.liqi.monitor.domain.dto.DriveAndSdkDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Author: lgh
 * @Date: 2022-10-28
 * @Description:
 */
@Data
@ApiModel(value = "更新结果上报接口")
public class UpdateResultDto {
    @ApiModelProperty(value = "设备唯一id",required = true)
    @NotBlank(message = "设备id不能为空")
    private String deviceId;

    @ApiModelProperty(value = "更新计划id",required = true)
    @NotBlank(message = "更新计划id不能为空")
    private String planId;

    @ApiModelProperty(value = "1=表示执行成功，-1表示执行失败，2表示人为终止成功，3部分成功",required = true)
    @NotBlank(message = "更新状态不能为空")
    private String planStatus;

    @ApiModelProperty(value = "更新失败消息")
    private String errorMessage;

    @ApiModelProperty(value = "更新前的中间件版本")
//    @NotBlank(message = "设备id不能为空")
    private String middlewareOldVersion;

    @ApiModelProperty(value = "更新后的中间件版本")
//    @NotBlank(message = "设备id不能为空")
    private String middlewareNewVersion;


    @ApiModelProperty(value = "更新插件详细信息")
    @NotNull(message = "不能为空")
    private List<DriveAndSdkDto> resultDetail;
}
